package com.hsjk.szwj.module.train.service.impl;

import com.hsjk.szwj.framework.common.pojo.PageResult;
import com.hsjk.szwj.module.train.controller.admin.vo.AdminStudentPageReqVO;
import com.hsjk.szwj.module.train.controller.admin.vo.AdminStudentPageRespVO;
import com.hsjk.szwj.module.train.convert.StudentConvert;
import com.hsjk.szwj.module.train.dal.dataobject.student.StudentInfoDO;
import com.hsjk.szwj.module.train.dal.mysql.student.IStudentInfoMapper;
import com.hsjk.szwj.module.train.service.IStudentService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 * @author chenjiawei
 * @desc
 * @Date 2023/09/10 00:35
 **/
@Service
public class StudentServiceImpl implements IStudentService {
    @Resource
    private IStudentInfoMapper studentInfoMapper;

    @Override
    public PageResult<AdminStudentPageRespVO> getStudentPageList(AdminStudentPageReqVO reqVO) {
        PageResult<StudentInfoDO> studentInfoDOPageResult = studentInfoMapper.selectPage(reqVO);
        return StudentConvert.INSTANCE.convertAdminStudentPageRespVO(studentInfoDOPageResult);
    }
}
